package org.liveboardgames.agricola.utils;

import org.liveboardgames.agricola.model.enums.ActionOutputEnum;
import org.liveboardgames.agricola.model.enums.ResourceTypeEnum;

public class Enums {

  public static String convertActionOutputToResource(String outputType) {
    String resourceType = null;
    if (outputType != null) {
      if (outputType.equals(ActionOutputEnum.CLAY)) {
        resourceType = ResourceTypeEnum.CLAY;
      }
      else if (outputType.equals(ActionOutputEnum.WOOD)) {
        resourceType = ResourceTypeEnum.WOOD;
      }
      else if (outputType.equals(ActionOutputEnum.STONE)) {
        resourceType = ResourceTypeEnum.STONE;
      }
      else if (outputType.equals(ActionOutputEnum.REED)) {
        resourceType = ResourceTypeEnum.REED;
      }
      else if (outputType.equals(ActionOutputEnum.SHEEP)) {
        resourceType = ResourceTypeEnum.SHEEP;
      }
      else if (outputType.equals(ActionOutputEnum.BOAR)) {
        resourceType = ResourceTypeEnum.BOAR;
      }
      else if (outputType.equals(ActionOutputEnum.CATTLE)) {
        resourceType = ResourceTypeEnum.CATTLE;
      }
      else if (outputType.equals(ActionOutputEnum.FOOD)) {
        resourceType = ResourceTypeEnum.FOOD;
      }
      else if (outputType.equals(ActionOutputEnum.GRAIN)) {
        resourceType = ResourceTypeEnum.GRAIN;
      }
      else if (outputType.equals(ActionOutputEnum.VEGETABLE)) {
        resourceType = ResourceTypeEnum.VEGETABLE;
      }
    }
    return resourceType;
  }

}
